<%@ page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="flyfox" uri="flyfox.tld"  %>
<%@taglib uri="jsp_layout.tld" prefix="layout"%>

<layout:override name="head">
	<%@include file="/mobile/component/include/head.jsp"%>
	<script language="javascript" type="text/javascript" src="static/component/echarts/echarts-plain.js"></script>
	
	<script language="javascript" type="text/javascript" >
		var totalMoneyData = ${totalMoney};
		var projectMoneyData = ${projectMoney};
		var trendMoneyData = "";
	</script>
	<script type="text/javascript" src="mobile/pages/web/home.js"></script>
	
	<style id="collapsible-list-item-style-flat">
		.ui-li-static.ui-collapsible > .ui-collapsible-heading {
			margin: 0;
		}

		.ui-li-static.ui-collapsible {
			padding: 0;
		}

		.ui-li-static.ui-collapsible > .ui-collapsible-heading > .ui-btn {
			border-top-width: 0;
		}

		.ui-li-static.ui-collapsible > .ui-collapsible-heading.ui-collapsible-heading-collapsed > .ui-btn,
		.ui-li-static.ui-collapsible > .ui-collapsible-content {
			border-bottom-width: 0;
		}
	</style>
	
</layout:override>

<layout:override name="body">


<div data-role="page" id="home">
  <div data-role="header"  data-position="fixed" data-theme="b">
    <h3>欢迎来到金钱管理</h3>
  </div>

  <div data-role="content">
		<div id="echarts2" style="height:300px;width:100%;"></div>
		<div id="echarts1" style="height:300px;"></div>
  </div>

  <div data-role="footer"  data-position="fixed"  data-theme="b">
    <div data-role="navbar">
      <ul>
        <li><a href="web" data-icon="home"  class="ui-btn-active">首页</a></li>
        <li><a href="#project" data-icon="grid">费用明细</a></li>
        <li><a href="#contact" data-icon="user">联系我们</a></li>
      </ul>
    </div>
  </div>
</div> 

<%-- 费用报表 --%>
<div data-role="page" id="project">
  <div data-role="header"  data-position="fixed" data-theme="b">
  	<a href="#add_project" class="ui-btn-left ui-btn ui-shadow ui-corner-all ui-icon-bullets ui-btn-icon-notext ui-btn-b ui-btn-inline">添加项目</a>
    <h3>项目信息</h3>
    <a href="#add_money" class="ui-btn-right ui-btn ui-shadow ui-corner-all ui-icon-plus ui-btn-icon-notext ui-btn-b ui-btn-inline">添加明细</a>
  </div>

  <div data-role="content">
  	
	<ul data-role="listview" data-shadow="false">
	<c:forEach items="${requestScope.listProject}" var="item" varStatus="row">
		<li data-role="collapsible" data-iconpos="right" data-inset="false">
	 	<h2>${item.name}</h2>
		<%-- <li data-role="list-divider">${item.name}<span class="ui-li-count">${item.remark}!</span></li> --%>
		<ul data-role="listview" data-theme="a">
		<c:forEach items="${requestScope.mapMoney[item.id]}" var="item" varStatus="row">
			<c:choose>
		          <c:when test="${item.type==23}">
		              <c:set var="fee_ico" value="arrow-r" />
		          </c:when>
		          <c:when test="${item.type==22}">
		              <c:set var="fee_ico" value="arrow-l" />
		          </c:when>
		         <c:otherwise>
		            <c:set var="fee_ico" value="arrow-u" />
		          </c:otherwise>
		    </c:choose>
			<li data-icon="<c:out value="${fee_ico }" />"><a href="#">${item.name}（${item.amount}）<span class="ui-li-count">${item.pay_time}</span></a></li>
		</c:forEach>
		</ul>
		</li>
	</c:forEach>
	</ul>
		
  </div>

  <div data-role="footer"  data-position="fixed"  data-theme="b">
    <div data-role="navbar">
      <ul>
        <li><a href="web" data-icon="home">首页</a></li>
        <li><a href="#project" data-icon="grid"  class="ui-btn-active">费用明细</a></li>
        <li><a href="#contact" data-icon="user">联系我们</a></li>
      </ul>
    </div>
  </div>
</div> 
  

<%-- 联系我们 --%>
<div data-role="page" id="contact">
  <div data-role="header"  data-position="fixed" data-theme="b">
    <h3>联系我们</h3>
  </div>

  <div data-role="content">
		作者：Fly的狐狸 
		<br>Q&nbsp;&nbsp;Q：330627517<br><br>
	<%
		String path = request.getContextPath();
		String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
				+ path + "/";
	%>
   	<iframe class="ueditor_baidumap" src="<%=basePath%>static/html/show.html#center=116.391496,39.913783&zoom=13&width=330&height=320&markers=116.404,39.915&markerStyles=l,A" frameborder="0" width="334" height="324"></iframe>
   	
  </div>

  <div data-role="footer"  data-position="fixed"  data-theme="b">
    <div data-role="navbar">
      <ul>
        <li><a href="web" data-icon="home">首页</a></li>
        <li><a href="#project" data-icon="grid">费用明细</a></li>
        <li><a href="#contact" data-icon="user"  class="ui-btn-active">联系我们</a></li>
      </ul>
    </div>
  </div>
</div> 

<%@include file="/mobile/pages/web/add_project.jsp" %>

<%@include file="/mobile/pages/web/add_money.jsp" %>

</layout:override>

<%@include file="/static/common/_layout.jsp"%>
